node_dlang

Undocumented in source.

Members

Aliases

Console
alias Console = JSObj!Console_
Undocumented in source.
ExternC
alias ExternC(T) = SetFunctionAttributes!(T, "C", functionAttributes!T)
Undocumented in source.
ExternD
alias ExternD(T) = SetFunctionAttributes!(T, "D", functionAttributes!T)
Undocumented in source.
ScopedJSObj
alias ScopedJSObj(Template) = JSObj!(Template, false)

Similar to JSObj but doesn't have a reference counter, so cannot be used after the JS call that has the scope where this was created. Template is a struct type that contains fields and function declarations that this struct will attempt to copy in signature but with JS type conversions. Do note that accessing members is done lazily.

func
alias func = void
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Classes

JSException
class JSException
Undocumented in source.

Functions

aaToNapi
napi_status aaToNapi(napi_env env, V[string] toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
algebraicToNapi
napi_status algebraicToNapi(napi_env env, VariantN!T toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
arrayToNapi
napi_status arrayToNapi(napi_env env, F[] array, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
boolToNapi
napi_status boolToNapi(napi_env env, bool toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
callNapi
auto callNapi(napi_env env, napi_value context, napi_value func, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
callableToNapi
napi_status callableToNapi(napi_env env, F toCall, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
callbackToNapi
napi_status callbackToNapi(napi_env env, napi_callback toConvert, napi_value* toRet, F* fPointer)
Undocumented in source. Be warned that the author may not have intended to support it.
constructor
auto constructor(napi_env env, napi_value constructorNapi, T args)
Undocumented in source. Be warned that the author may not have intended to support it.
delegateToNapi
napi_status delegateToNapi(napi_env env, Dg* toCall, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
fromJsPtr
napi_value fromJsPtr(napi_env env, napi_callback_info info)
Undocumented in source. Be warned that the author may not have intended to support it.
fromNapi
T fromNapi(napi_env env, napi_value value)

Gets a D typed value from a napi_value

getAA
auto getAA(napi_env env, napi_value napiVal, V[string]* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getArray
auto getArray(napi_env env, napi_value napiVal, A[]* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getDgPointer
auto getDgPointer(napi_env env, napi_value func, FP* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getFloat
auto getFloat(napi_env env, napi_value napiVal, float* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getJSVar
auto getJSVar(napi_env env, napi_value napiVal, JSVar* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getJSobj
auto getJSobj(napi_env env, napi_value ctx, T* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getNullable
napi_status getNullable(napi_env env, napi_value value, Nullable!BaseType* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getStaticArray
auto getStaticArray(napi_env env, napi_value napiVal, A* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getStr
auto getStr(napi_env env, napi_value napiVal, StrType* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
auto getStruct(napi_env env, napi_value napiVal, S* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
getTypedArray
auto getTypedArray(napi_env env, napi_value napiVal, TypedArray!T* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
global
auto global(napi_env env)
Undocumented in source. Be warned that the author may not have intended to support it.
global
auto global(napi_env env, string name)
Undocumented in source. Be warned that the author may not have intended to support it.
inJSScope
void inJSScope(napi_env env)
Undocumented in source. Be warned that the author may not have intended to support it.
isMainFunction
bool isMainFunction()
Undocumented in source. Be warned that the author may not have intended to support it.
isMainFunction
bool isMainFunction()
Undocumented in source. Be warned that the author may not have intended to support it.
isUndefined
bool isUndefined(napi_env env, napi_value val)
Undocumented in source. Be warned that the author may not have intended to support it.
jsFunction
auto jsFunction(napi_env env, napi_value func, R* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
jsLog
void jsLog(napi_env env, T toLog)
Undocumented in source. Be warned that the author may not have intended to support it.
jsObjToNapi
napi_status jsObjToNapi(napi_env env, T toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
jsVarToNapi
napi_status jsVarToNapi(napi_env env, JSVar toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
napiIdentity
auto napiIdentity(napi_env _1, napi_value value, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
nullableToNapi
napi_status nullableToNapi(napi_env env, Nullable!T toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
p
auto p(napi_value obj, napi_env env, S propName)
Undocumented in source. Be warned that the author may not have intended to support it.
p
void p(napi_value obj, napi_env env, S propName, InType newVal)
Undocumented in source. Be warned that the author may not have intended to support it.
reference
auto reference(napi_env env, napi_value obj)
Undocumented in source. Be warned that the author may not have intended to support it.
stringToNapi
napi_status stringToNapi(napi_env env, StrType toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
structToNapi
napi_status structToNapi(napi_env env, S toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
throwInJS
void throwInJS(napi_env env, string message)
Undocumented in source. Be warned that the author may not have intended to support it.
toNapiValue
napi_value toNapiValue(F toCast, napi_env env)
Undocumented in source. Be warned that the author may not have intended to support it.
toNapiValueArray
auto toNapiValueArray(napi_env env, T args)
Undocumented in source. Be warned that the author may not have intended to support it.
tupleToNapi
napi_status tupleToNapi(napi_env env, T toConvert, napi_value* toRet)
Undocumented in source. Be warned that the author may not have intended to support it.
typedArrayToNapi
napi_status typedArrayToNapi(napi_env env, TypedArray!T array, napi_value* toRet)

Note: The array data must be kept alive in D.

undefined
napi_value undefined(napi_env env)
Undocumented in source. Be warned that the author may not have intended to support it.
val
auto val(napi_env env, napi_ref reference)
Undocumented in source. Be warned that the author may not have intended to support it.
withNapiExpectedSignature
napi_value withNapiExpectedSignature(napi_env env, napi_callback_info info)
Undocumented in source. Be warned that the author may not have intended to support it.

Imports

napi_callback (from js_native_api_types)
public import js_native_api_types : napi_env, napi_value, napi_callback;
Undocumented in source.
napi_env (from js_native_api_types)
public import js_native_api_types : napi_env, napi_value, napi_callback;
Undocumented in source.
napi_value (from js_native_api_types)
public import js_native_api_types : napi_env, napi_value, napi_callback;
Undocumented in source.

Mixin templates

exportToJs
mixintemplate exportToJs(Exportables...)
Undocumented in source.

Structs

JSObj
struct JSObj(Template, bool useRefCount = true)

Stores a JS value with a reference counter so that JS's GC doesn't collect it whilst it's stored in D. Template is a struct type that contains fields and function declarations that this struct will attempt to copy in signature but with JS type conversions. Do note that accessing members is done lazily.

JSVar
struct JSVar
Undocumented in source.
Named
struct Named
Undocumented in source.
Promise
struct Promise
Undocumented in source.
TypedArray
struct TypedArray(Element)

Note: No conversion implemented for Uint8ClampedArray.

Templates

MainFunction
template MainFunction(alias Function)
Undocumented in source.
Returns
template Returns(alias Function, OtherType)
Undocumented in source.
fromNapiB
template fromNapiB(T)
Undocumented in source.
isVariantN
template isVariantN(alias T)
Undocumented in source.
toNapi
template toNapi(alias T)
Undocumented in source.

Variables

console
auto console;
Undocumented in source.

Meta